<?php

namespace Part07_ProxyPattern\Code2;


class Proxy
{
    private $schoolGirl;

    public function __construct($proxyName, $schoolGirl)
    {
        $this->schoolGirl = $schoolGirl;
        echo "[$proxyName]帮忙送礼物给[$schoolGirl]\n";
    }

    public function giveDolls()
    {
        echo '送了洋娃娃给' . $this->schoolGirl . "\n";
    }

    public function giveFlowers()
    {
        echo '送了鲜花给' . $this->schoolGirl . "\n";
    }

    public function giveChocolate()
    {
        echo '送了巧克力给' . $this->schoolGirl . "\n";
    }
}